
/* -----------------
* brief 
* 1. this is code gen by tools 
* 2. mvc code are driver by the model defined with the same filename,
	 for example:
	 there is a Xmodel struct define in xmodel.go file, after the script run (lego model-mvc module_name xmodel)
     it will auto create the code under the module's path
	 m --> xmodel.go
	 v --> view
	 c --> xmodel_ctrl 
* 3. you should modify this code if it doesn't satisfy your purpose   
*/

package controller

import (
	configService "saas_sys_base/modules/config/service"
	. "saas_sys_base/modules/appmanager/service"
)

type AppManagerCtrl struct {
	appManagerService  AppManagerService
	appConfigService configService.AppConfigService
}


func init () {
	vc:= new(AppManagerCtrl)
	_ctrlList = append(_ctrlList,vc)

	/*appconfigList := vc.appConfigService.GetAllAppConfig()
	for _, appconfig := range appconfigList {
		vc.appManagerService.RegisterApp(appconfig)
	}*/
}

func (vc*AppManagerCtrl)CtrlInfo() string {
	return "AppAttrCtrl"
}

func (vc*AppManagerCtrl)RoutInit() {
	appconfigList := vc.appConfigService.GetAllAppConfig()
	for _, appconfig := range appconfigList {
		vc.appManagerService.RegisterApp(appconfig)
	}
}
